<template>
  <div class="not-found">
    <div class="not-found-content">
      <div class="not-found-icon">404</div>
      <h1>页面未找到</h1>
      <p>抱歉，你访问的页面不存在</p>
      <div class="actions">
        <router-link to="/" class="btn btn-primary"> 返回首页 </router-link>
        <router-link to="/learn" class="btn btn-secondary"> 开始学习 </router-link>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 404页面组件
</script>

<style lang="less" scoped>
@import '@/styles/variables.less';

// 自定义变量
@secondary-color: #667eea;
@secondary-hover: #764ba2;

// 主容器
.not-found {
  .flex-center();
  min-height: calc(100vh - 126px);
  background: linear-gradient(135deg, @secondary-color 0%, @secondary-hover 100%);
}

.not-found-content {
  text-align: center;
  color: white;
  max-width: 500px;
  padding: 40px;

  .not-found-icon {
    font-size: 8rem;
    font-weight: bold;
    margin-bottom: 20px;
    opacity: 0.8;
  }

  h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
  }

  p {
    font-size: 1.2rem;
    margin-bottom: 32px;
    opacity: 0.9;
  }
}

// 操作按钮
.actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border-radius: @border-radius;
  text-decoration: none;
  font-weight: 600;
  .transition();

  &.btn-primary {
    background: @primary-color;
    color: white;

    &:hover {
      background: @primary-hover;
      transform: translateY(-2px);
    }
  }

  &.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;

    &:hover {
      background: white;
      color: @secondary-color;
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .not-found-content {
    .not-found-icon {
      font-size: 6rem;
    }

    h1 {
      font-size: 2rem;
    }
  }

  .actions {
    flex-direction: column;
    align-items: center;
  }
}
</style>
